package com.yxinsur.imc.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseImcEntity;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 佣金计算险种明细对象 imc_comm_risk
 *
 * @author imc
 * @date 2021-05-26
 */
@Data
@ToString
public class ImcCommRisk extends BaseImcEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 佣金报表主键
     */
    @Excel(name = "佣金报表主键")
    private Long commId;

    /**
     * 险种表外键
     */
    @Excel(name = "险种表外键")
    private Long orderRiskId;

    /**
     * 保单表外键
     */
    @Excel(name = "保单表外键")
    private Long orderId;

    /**
     * 产品库表的外键（非我的产品表）
     */
    @Excel(name = "产品库表的外键", readConverterExp = "非=我的产品表")
    private Long repoInsId;

    /**
     * 代理人外键
     */
    @Excel(name = "代理人外键")
    private Long brokerId;

    /**
     * 初始代理人外键
     */
    @Excel(name = "初始代理人外键")
    private Long initBrokerId;

    /**
     * 险种代码
     */
    @Excel(name = "险种代码")
    private String insCode;

    /**
     * 主险M附加险A
     */
    @Excel(name = "主险M附加险A")
    private String riskType;

    /**
     * 险种名称
     */
    @Excel(name = "险种名称")
    private String riskName;

    /**
     * 险种保费-首年的保费[可能存在非年缴多次的保费]
     */
    @Excel(name = "险种保费-首年的保费[可能存在非年缴多次的保费]")
    private BigDecimal prem;

    /**
     * 应缴保费
     */
    @Excel(name = "应缴保费")
    private BigDecimal payablePrem;

    /**
     * 实缴保费
     */
    @Excel(name = "实缴保费")
    private BigDecimal paymentPrem;

    /**
     * 折标率
     */
    @Excel(name = "折标率")
    private BigDecimal standRate;

    /**
     * 首年保费对应标保
     */
    @Excel(name = "首年保费对应标保")
    private BigDecimal standPrem;

    /**
     * 代理人佣金率
     */
    @Excel(name = "代理人佣金率")
    private BigDecimal commissionRate;

    /**
     * 佣金
     */
    @Excel(name = "佣金")
    private BigDecimal commission;

    /**
     * 保障期限
     */
    @Excel(name = "保障期限")
    private String coveragePeriodValue;

    /**
     * 缴费期限
     */
    @Excel(name = "缴费期限")
    private String chargePeriodValue;

    /**
     * 保单所在年度首年为1
     */
    @Excel(name = "保单所在年度首年为1")
    private Long policyYear;

    /**
     * 保单缴费次数，首次为1
     */
    @Excel(name = "保单缴费次数，首次为1")
    private Long payNum;

    /**
     * 应缴日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "应缴日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payableDate;

    /**
     * 实缴日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实缴日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentDate;

    /**
     * 投保日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "投保日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyDate;

    /**
     * 撤单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "撤单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancelDate;

    /**
     * 承保日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "承保日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date insureDate;

    /**
     * 保单生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保单生效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveDate;

    /**
     * 保单失效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保单失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredDate;

    /**
     * 客户回执签收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "客户回执签收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date custAckDate;

    /**
     * 回执录入时间(回执录入系统时间)
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "回执录入时间(回执录入系统时间)", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ackDate;

    /**
     * 险种终止日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "险种终止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /**
     * $column.columnComment
     */
    @Excel(name = "险种终止日期")
    private String createId;

    /**
     * $column.columnComment
     */
    @Excel(name = "险种终止日期")
    private String updateId;

    /**
     * 逻辑删除
     */
    @Excel(name = "逻辑删除")
    private String isDeleted;

    /**
     * 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构）
     */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private Long tenantId;

    /**
     * 备注
     */
    private String remark;

    //是否为添加保单
    private String isAppend;
}
